package com.whfc.ms.api.md.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.ms.api.md.service.MdQualityBoardService;
import com.whfc.quality.dto.*;
import com.whfc.quality.service.QualityCheckService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021/11/17 14:05
 */
@Service
public class MdQualityBoardServiceImpl implements MdQualityBoardService {


    @DubboReference(interfaceClass = com.whfc.quality.service.MdQualityBoardService.class, version = "1.0.0")
    private com.whfc.quality.service.MdQualityBoardService mdQualityBoardService;

    @DubboReference(interfaceClass = QualityCheckService.class, version = "1.0.0")
    private QualityCheckService qualityCheckService;

    @Override
    public ListData<MdQualityStatisticsDTO> getCheckTypeStatistics(Integer deptId, Date startTime, Date endTime) {
        return mdQualityBoardService.getCheckTypeStatistics(deptId, startTime, endTime);
    }

    @Override
    public PageData<MdQualityCheckDTO> getCheckList(Integer deptId, Integer pageNum, Integer pageSize) {
        return mdQualityBoardService.getCheckList(deptId, pageNum, pageSize);
    }

    @Override
    public MdQualityCheckAnalysisDTO getCheckAnalysis(Integer deptId) {
        return mdQualityBoardService.getCheckAnalysis(deptId);
    }

    @Override
    public PageData<MdQualityCheckLogDTO> getCheckLog(Integer deptId, Integer pageNum, Integer pageSize) {
        return mdQualityBoardService.getCheckLog(deptId, pageNum, pageSize);
    }

    @Override
    public QualityCheckUnfinishedDTO qualityCheckUnfinished(Integer deptId, Date startTime, Date endTime) {
        return qualityCheckService.qualityCheckUnfinished(deptId, startTime, endTime);
    }
}
